package wiki.hitime.demo.test.manager;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import wiki.hitime.demo.test.bean.db.Order;
import wiki.hitime.demo.test.mapper.OrderMapper;

import javax.annotation.Resource;

/**
 * @author zhangdaoping
 * @create 2019-10-30 17:02
 */
@Slf4j
@Component
public class OrderManager {

    @Resource
    private OrderMapper orderMapper;

    /**
     * 根据订单编号获取数据
     *
     * @param orderId 订单编号
     * @return 订单数据
     */
    public Order loadByOrderId(String orderId) {
        log.info("测试");
        // 获取数据
        return orderMapper.selectByOrderId(orderId);
    }

}
